extends "../calxsm_2_2/calxsm_2_2.gd"
func _init():
	pass
func _extInit():
	._extInit()
	chaName = "奥天"  
	lv = 4
	addSkillTxt("[color=#FFFF00][回光返照][/color][color=#FFCC22]独角兽的希望之光，对目标单体造成自身已损失体力的神秘系物理伤害，有8%概率回复自身所有体力\n体力越低，概率越高，最高至17%[CD:16]")
	addCdSkill("hgfz",16)

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "hgfz":
		var dmg = 8 + (1-(att.hp/att.maxHp))*10
		var eff = sys.newEff("numHit", position, false, 1)
		eff.setText("回光返照", "#FF0099")
		eff.anim.set_speed_scale(0.2)
		typeHurtCha(aiCha,(att.maxHp-att.hp)*1,Chara.HurtType.PHY,Chara.AtkType.SKILL)
		if sys.rndPer(dmg):
			plusHp(att.maxHp*1)
